package app.productmanagement.web.ProductTag.CopyTag;

import app.productmanagement.web.ProductTag.Pojo.Tag;
import app.productmanagement.web.ProductTag.Pojo.TagRequest;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(componentModel = "spring")
public abstract class CopyTag {
// TagRequest {
//     private String name;
//     private String description;
// }
//Tag {
//    @TableId(type= IdType.AUTO)
//    private Integer id; // 标签ID
//    private String name; // 标签名称
//    private String description; // 标签描述
//}
    //TagRequest -> Tag
    @Mappings({@Mapping(target = "Tag.id", ignore = true)})
    public abstract Tag CopyTagRequestToTag(TagRequest tag);
}
